import request from './request.js'
const jobAPI = {
  async getListJob(page, pageSize, category) {
    var params = {}
    if (category == '') {
      params = {
        page: page,
        pageSize: pageSize,
      }
    } else {
      params = {
        page: page,
        pageSize: pageSize,
        category: category,
      }
    }
    return await request({
      method: 'get',
      url: '/job/findListJob',
      params: params,
    })
  },
  async getDetailJob(jobId) {
    return await request({
      method: 'get',
      url: '/job/getDetail',
      params: {
        jobId: jobId,
      },
    })
  },
}

export default {
  jobAPI,
}
